<template>
  <div ref="main" class="box"></div>
</template>

<script>
export default {
  name: "DoctorEndMasterFazuojilu",
  data() {
    return {};
  },

  mounted() {
    this.drawing();
  },
  // 那个页面在用这个
  methods: {
    drawing() {
      let myChart = this.$echarts.init(this.$refs.main);
      myChart.setOption({
        title: {
          text: "发作记录",
        },
        tooltip: {
          trigger: "axis",
        },
        legend: {
          data: ["Email", "Union Ads", "Video Ads", "Direct", "Search Engine"],
        },
        grid: {
          left: "3%",
          right: "4%",
          bottom: "3%",
          containLabel: true,
        },
        toolbox: {
          feature: {
            saveAsImage: {},
          },
        },
        xAxis: {
          type: "category",
          boundaryGap: false,
          data: ["11-07", "11-08", "11-09", "11-10", "11-11", "11-12", "11-13"],
        },
        yAxis: {
          type: "value",
        },
        series: [
          {
            name: "发作次数",
            type: "line",
            stack: "Total",
            data: [1, 3, 1, 0, 4, 6, 3],
          },
        ],
      });
    },
  },
};
</script>

<style lang="less" scoped>
.box {
  width: 900px;
  height: 400px;
  //   background: red;
}
</style>